Imports Common.Env

Imports Common
Imports StartFrame.DA.Sql
Imports StartPoint.BR.Interfaces
Imports Common.spmc


Public Class CondicionesIva
    Inherits StartFrame.BR.Abm
    Implements ICondicionesIva

    Sub New()
        MyBase.New(Operador, Password, "wacondiva", "wad_cond_iva")
    End Sub

    'Retorna los datos del combo de tipos de factura
    'REV: OV, 07/12/04
    Public Function getTiposFactura() As DataSet Implements ICondicionesIva.getTiposFactura

        Dim ds As New DataSet()
        Dim row(1) As String
        Dim i As Integer

        'Dataset
        Dim c1 As New DataColumn("id", System.Type.GetType("string"))
        Dim c2 As New DataColumn("descripcion", System.Type.GetType("string"))
        ds.Tables.Add("tipo_factura")
        ds.Tables(0).Columns.Add(c1)
        ds.Tables(0).Columns.Add(c2)

        'Blanco
        row(0) = ""
        row(1) = ""
        ds.Tables(0).Rows.Add(row)

        'Todas las letras del abecedario
        For i = 65 To 90
            row(0) = Chr(i)
            row(1) = Chr(i)
            ds.Tables(0).Rows.Add(row)
        Next

        Return ds

    End Function

    'Retorna los datos del combo de tipos de iva
    'REV: OV, 07/12/04
    Public Function getTiposIva() As tipo_id_desc Implements ICondicionesIva.getTiposIva

        Dim ds As New tipo_id_desc
        Dim row(1) As String

        'Datos
        row(0) = "C"
        row(1) = "Compras"
        ds.tipo_id_desc.Rows.Add(row)
        row(0) = "V"
        row(1) = "Ventas"
        ds.tipo_id_desc.Rows.Add(row)

        Return ds

    End Function

End Class
